home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / syntax / xkb.vim < prev    next >
Encoding:
Text File  |  2001-07-13  |  3.5 KB  |  93 lines

  1. " Vim syntax file
  2. " This is a GENERATED FILE. Please always refer to source file at the URI below.
  3. " Language: XKB (X Keyboard Extension) components
  4. " Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
  5. " Last Change: 2001-04-26
  6. " URI: http://physics.muni.cz/~yeti/download/xkb.vim
  7.  
  8.  
  9. " Setup
  10. if version >= 600
  11.   if exists("b:current_syntax")
  12.     finish
  13.   endif
  14. else
  15.   syntax clear
  16. endif
  17.  
  18. syn case match
  19. syn sync minlines=100
  20.  
  21. " Comments
  22. syn region xkbComment start="//" skip="\\$" end="$" keepend contains=xkbTodo
  23. syn region xkbComment start="/\*" matchgroup=NONE end="\*/" contains=xkbCommentStartError,xkbTodo
  24. syn match xkbCommentError "\*/"
  25. syntax match xkbCommentStartError "/\*" contained
  26. syn sync ccomment xkbComment
  27. syn keyword xkbTodo TODO FIXME contained
  28.  
  29. " Literal strings
  30. syn match xkbSpecialChar "\\\d\d\d\|\\." contained
  31. syn region xkbString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=xkbSpecialChar oneline
  32.  
  33. " Catch errors caused by wrong parenthesization
  34. syn region xkbParen start='(' end=')' contains=ALLBUT,xkbParenError,xkbSpecial,xkbTodo transparent
  35. syn match xkbParenError ")"
  36. syn region xkbBrace start='{' end='}' contains=ALLBUT,xkbBraceError,xkbSpecial,xkbTodo transparent
  37. syn match xkbBraceError "}"
  38. syn region xkbBracket start='\[' end='\]' contains=ALLBUT,xkbBracketError,xkbSpecial,xkbTodo transparent
  39. syn match xkbBracketError "\]"
  40.  
  41. " Physical keys
  42. syn match xkbPhysicalKey "<\w\+>"
  43.  
  44. " Keywords
  45. syn keyword xkbPreproc augment include replace
  46. syn keyword xkbConstant False True
  47. syn keyword xkbModif override replace
  48. syn keyword xkbIdentifier action affect alias allowExplicit approx baseColor clearLocks color controls cornerRadius ctrls description driveskbd font fontSize gap group height indicator interpret key keys labelColor latchToLock left level_name map maximum minimum modifier_map modifiers name offColor onColor outline preserve priority repeat row section section shape slant solid symbols text top type useModMapMods virtualModifier virtualMods virtual_modifiers weight whichModState width
  49. syn keyword xkbAction ISOLock LatchGroup LatchMods LockControls LockGroup LockMods NoAction SetControls SetGroup SetMods Terminate
  50. syn keyword xkbTModif default hidden partial virtual
  51. syn keyword xkbSect alphanumeric_keys alternate_group keypad_keys modifier_keys xkb_compatibility xkb_geometry xkb_keycodes xkb_keymap xkb_semantics xkb_symbols xkb_types
  52.  
  53. " Define the default highlighting
  54. if version >= 508 || !exists("did_xkb_syntax_inits")
  55.   if version < 508
  56.     let did_xkb_syntax_inits = 1
  57.     command -nargs=+ HiLink hi link <args>
  58.   else
  59.     command -nargs=+ HiLink hi def link <args>
  60.   endif
  61.  
  62.   HiLink xkbModif             xkbPreproc
  63.   HiLink xkbTModif            xkbPreproc
  64.   HiLink xkbPreproc           Preproc
  65.  
  66.   HiLink xkbIdentifier        Keyword
  67.   HiLink xkbAction            Function
  68.   HiLink xkbSect              Type
  69.   HiLink xkbPhysicalKey       Identifier
  70.   HiLink xkbKeyword           Keyword
  71.  
  72.   HiLink xkbComment           Comment
  73.   HiLink xkbTodo              Todo
  74.  
  75.   HiLink xkbConstant          Constant
  76.   HiLink xkbString            String
  77.  
  78.   HiLink xkbSpecialChar       xkbSpecial
  79.   HiLink xkbSpecial           Special
  80.  
  81.   HiLink xkbParenError        xkbBalancingError
  82.   HiLink xkbBraceError        xkbBalancingError
  83.   HiLink xkbBraketError       xkbBalancingError
  84.   HiLink xkbBalancingError    xkbError
  85.   HiLink xkbCommentStartError xkbCommentError
  86.   HiLink xkbCommentError      xkbError
  87.   HiLink xkbError             Error
  88.  
  89.   delcommand HiLink
  90. endif
  91.  
  92. let b:current_syntax = "xkb"
  93.